// "Copyright [2021] <Copyright Shengkai Lin>"

package cluster.network_controller;

import cluster.network_controller.topo_manager.*;

module NetworkController {
    parameters:
        bool needStaticLeaf = default(false);
    gates:
        inout switch_port[];
        // inout adapter_port;
        inout dispatcher_port;
    submodules:
        network_routing: NetworkRouting {
            needStaticLeaf = needStaticLeaf;
        }

    connections allowunconnected:
        for i=0..sizeof(switch_port)-1 {
            network_routing.switch_port++ <--> switch_port++;
        }
        // network_routing.adapter_port <--> adapter_port;
        network_routing.dispatcher_port --> dispatcher_port$o;
}